/**
 * Created by licj02 on 2017/4/11.
 */
import fetch from 'isomorphic-fetch';

export default {
    defaultParams:{
        pApiDomain: __DEV__ ? 'https://pdev.mingyuanyun.com/api/v1' : ( __TEST__ ? 'https://ptest.mingyuanyun.com/api/v1' : 'https://p.mingyuanyun.com/api/v1'),
        api:`/log-collection/save-log`
    },
    saveLog(log){
/*        fetch(
            this.defaultParams.pApiDomain+this.defaultParams.api,
            {
                method: 'POST',
                headers: {
                    'Accept': 'application/json',
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify(
                    {
                        'action': log.action,
                        'content': log.content
                    })
            }).then((res) => {
            res.json().then((json) => {
                if (json.result) {
                    //日志记录成功
                    //console.log(log);
                } else {
                    console.warn("操作日志记录失败了哦~")
                }
            });
        });*/
    }
}